package com.evil.application.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.evil.application.mapper.ApplicationOrderMapper;
import com.evil.application.pojo.dto.order.AddOrderReqDTO;
import com.evil.application.pojo.dto.order.AddOrderRespDTO;
import com.evil.application.pojo.dto.order.AppOrdersControlDataDTO;
import com.evil.application.pojo.dto.order.OrderPageReqDTO;
import com.evil.application.pojo.entity.ApplicationForm;
import com.evil.application.pojo.entity.ApplicationInfo;
import com.evil.application.pojo.entity.ApplicationOrder;
import com.evil.common.application.dto.order.OrderPageDataRespDTO;
import com.evil.common.application.dto.order.data.ControlDataDTO;
import com.evil.common.core.entity.QueryModel;
import com.github.pagehelper.PageInfo;

import java.util.Collection;
import java.util.List;

/**
 * 应用订单表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
public interface ApplicationOrderService extends IService<ApplicationOrder> {

    @Override
    ApplicationOrderMapper getBaseMapper();

    /**
     * 保存订单列表
     *
     * @param applicationOrders applicationOrders
     */
    void saveOrders(Collection<ApplicationOrder> applicationOrders);

    /**
     * 新增应用订单
     *
     * @param addOrderReqDTO addOrderReqDTO
     * @return AddOrderRespDTO
     */
    AddOrderRespDTO addOrder(AddOrderReqDTO addOrderReqDTO);

    /**
     * 批量编辑应用订单 （机器人）
     *
     * @param appOrdersControlDataDTO appOrdersControlDataDTO
     */
    void modifyOrderBatch(AppOrdersControlDataDTO appOrdersControlDataDTO);

    /**
     * 处理导入订单
     *
     * @param applicationInfo applicationInfo
     * @param applicationForm applicationForm
     * @param data            data
     * @return ApplicationOrder
     */
    ApplicationOrder handleImportOrders(ApplicationInfo applicationInfo, ApplicationForm applicationForm, List<ControlDataDTO> data);

    /**
     * 订单列表
     *
     * @param queryModel queryModel
     */
    PageInfo<OrderPageDataRespDTO> orderList(QueryModel<OrderPageReqDTO> queryModel);
}
